feat(WindowsPlatform): add option to disable Chocolatey Node.js upgrade#2033
Merged
cdklabs-automation merged 3 commits intomainfrom Feb 4, 2026
Merged
feat(WindowsPlatform): add option to disable Chocolatey Node.js upgrade#2033cdklabs-automation merged 3 commits intomainfrom
cdklabs-automation merged 3 commits intomainfrom
Conversation
Contributor
|
Draft until we live test this |
auto-merge was automatically disabled
February 3, 2026 18:12
Pull request was converted to draft
63fdc9e to
fa114e4
Compare
Contributor
Author
|
Live tested. Putting it up for review again. |
There was a problem hiding this comment.
Pull request overview
Adds an opt-out to the Windows CodeBuild platform setup so consumers can skip upgrading/installing Node.js via Chocolatey (to avoid external dependency/availability concerns).
Changes:
- Introduces a
WindowsPlatformconstructor parameter to control whether Node is upgraded via Chocolatey (default remains enabled). - Skips emitting Windows
installphase commands when Chocolatey-based Node upgrade is disabled.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add WindowsPlatformOptions interface with upgradeNodeWithChocolatey option (defaults to true for backward compatibility). This allows users to skip the Chocolatey Node.js upgrade during the install phase.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
iliapolo
approved these changes
Feb 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In f7a7581, we introduced a step to install/update
nodejs-lts, due to the Windows Server CodeBuild image relying on an old version of Node.This step relies on
https://community.chocolatey.org/api/v2/to installnode-lts, which can cause availability issues. Chocolatey's organizational development guide specifically recommends against doing this.In addition: Even when installing Node with Chocolatey, the container will still use the Node installation it shipped with, UNLESS a developer explicitly modifies their buildspec to call
refreshenv(an alias for Update-SessionEnvironment OR manually manipulates theirPATH. Without taking this additional step that we do not do for you, the container will still use the default Node installation.Regardless, Windows Server Core 2019 standard:3.0 image (made available February 7, 2024 per AWS CodeBuild history) ships with more up-to-date versions, as of writing:
Developers should upgrade their image version, rather than upgrading Node in the container run.
Changes
A developer who has the following code will see no change in behavior:
The image will still install Node from Chocolatey.
The following code does not install Node from Chocolatey:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.